<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
<head>
  <link href="https://gmpg.org/xfn/11" rel="profile">
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="generator" content="Hugo 0.68.3" />

  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>接口文档 &middot; 我的博客</title>
  <meta name="description" content="" />

  
  <link type="text/css" rel="stylesheet" href="/my_technology_blog/css/print.css" media="print">
  <link type="text/css" rel="stylesheet" href="/my_technology_blog/css/poole.css">
  <link type="text/css" rel="stylesheet" href="/my_technology_blog/css/syntax.css">
  <link type="text/css" rel="stylesheet" href="/my_technology_blog/css/hyde.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Abril+Fatface|PT+Sans:400,400i,700">


  
  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
  <link rel="shortcut icon" href="/favicon.png">

  
  
</head>

  <body class="theme-base-06 ">
  <aside class="sidebar">
  <div class="container sidebar-sticky">
    <div class="sidebar-about">
      <a href="/my_technology_blog/"><h1>我的博客</h1></a>
      <p class="lead">
       年轻是我们唯一拥有权力去编织梦想的时光 
      </p>
    </div>

    <nav>
      <ul class="sidebar-nav">
        <li><a href="/my_technology_blog/">Home</a> </li>
        
      </ul>
    </nav>

    <p>&copy; 2020. All rights reserved. </p>
  </div>
</aside>

    <main class="content container">
    <div class="post">
  <h1>接口文档</h1>
  <time datetime=2020-04-21T14:58:14&#43;0800 class="post-date">Tue, Apr 21, 2020</time>
  <h3 id="get关注取关商品"><em><strong>GET</strong></em>——关注（取关）商品</h3>
<ol>
<li>
<p>参数</p>
<table>
<thead>
<tr>
<th align="center">用户ID（uid）</th>
<th align="center">商品ID（gid）</th>
<th align="center">type（类型）</th>
<th align="center">is_ necessary（是否必需）</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">3</td>
<td align="center">5</td>
<td align="center">int</td>
<td align="center">Y</td>
</tr>
</tbody>
</table>
</li>
<li>
<p>示范</p>
</li>
</ol>
<pre><code>this.axios({
   url:'http://localhost:8000/getflow/',
   params:{
      uid:3,
      gid:5
   }
})
</code></pre><ol start="3">
<li>返回参数</li>
</ol>
<table>
<thead>
<tr>
<th align="center">msg1</th>
<th align="center">msg2</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">请勿重复关注</td>
<td align="center">关注成功</td>
</tr>
</tbody>
</table>
<ol start="4">
<li>返回结果</li>
</ol>
<pre><code>{
    &quot;msg&quot;: &quot;请勿重复关注&quot;
}
或
{
    &quot;msg&quot;: &quot;关注成功&quot;
}
</code></pre><h3 id="post增加商品浏览次数"><em><strong>POST</strong></em>——增加商品浏览次数</h3>
<ol>
<li>参数</li>
</ol>
<table>
<thead>
<tr>
<th align="center">商品ID(gid)</th>
<th align="center">类型(type)</th>
<th align="center">是否必需(is_necessary)</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">2</td>
<td align="center">int</td>
<td align="center">Y</td>
</tr>
</tbody>
</table>
<ol start="2">
<li>示例</li>
</ol>
<pre><code>this.axios({
   url:'http://localhost:8000/productviewtimes/',
   method:'post',
   data:{
      gid:2
   }
})
</code></pre><ol start="3">
<li>返回数据</li>
</ol>
<table>
<thead>
<tr>
<th align="center">code</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">200</td>
</tr>
</tbody>
</table>
<p>4.返回结果</p>
<pre><code>{
    &quot;code&quot;: 200
}

</code></pre><h3 id="options修改密码"><em><strong>OPTIONS</strong></em>——修改密码</h3>
<ol>
<li>参数</li>
</ol>
<table>
<thead>
<tr>
<th align="center">所需参数</th>
<th align="center">类型</th>
<th align="center">是否必需</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">opassword(原密码)</td>
<td align="center">str</td>
<td align="center">Y</td>
</tr>
<tr>
<td align="center">npassword(新密码)</td>
<td align="center">str</td>
<td align="center">Y</td>
</tr>
</tbody>
</table>
<ol start="2">
<li>示例</li>
</ol>
<pre><code>this.axios({
   url:'http://localhost:8000/update_pass/',
   method:'options',
   data:{
      opassword:'234',
      npassword:'123'
   }
})
</code></pre><ol start="3">
<li>返回结果</li>
</ol>
<pre><code>{
   'code':'修改成功'
}
或
{
   'code':'原密码错误'
}

</code></pre><h3 id="delete删除商品"><em><strong>DELETE</strong></em>——删除商品</h3>
<ol>
<li>参数</li>
</ol>
<table>
<thead>
<tr>
<th align="center">所需参数</th>
<th align="center">类型</th>
<th align="center">是否必需</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">gid</td>
<td align="center">int</td>
<td align="center">Y</td>
</tr>
<tr>
<td align="center">uid</td>
<td align="center">int</td>
<td align="center">Y</td>
</tr>
</tbody>
</table>
<ol start="2">
<li>示例</li>
</ol>
<pre><code>this.axios({
   url:'http://localhost:8000/del_goods/',
   method:'delete',
   data:{
      gid:3,
      uid:2
   }
})
</code></pre><ol start="3">
<li>返回结果</li>
</ol>
<pre><code>{
   'msg':'删除成功'
}

</code></pre>
</div>


    </main>

    
      
    
  </body>
</html>
